home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-20 | 1.1 KB | 41 lines | [TEXT/MPS ] |
- #
- # makecreate
- #
- # This script accepts an input file which is the binary image of a PCI expansion
- # card ROM and converts it to a series of Forth commands which can be downloaded
- # into the Open Firmware user interface and which will create a Forth array
- # named image-start which contains the binary image.
- #
- # Commands to leave the address and length of the image on the stack after the
- # download will be included in the resulting file, in anticipation of the execution
- # of the nv-flash command to flash the image into an NCR card.
- #
- # syntax: makecreate infile outfile
- #
- # by Monte Benaresh November 7, 1994
- #
-
-
- if {#} != 2
- echo '### makecreate--must have 2 parameters'
- exit
- end
-
- set sourcefile {1}
- set destfile {2}
-
- dumpfile -a -o -g 4 "{sourcefile}" > "{destfile}"
-
- open "{destfile}"
- find • "{destfile}"
- replace -c 5 /?*∂n/ "" "{destfile}"
- replace /∂n/ "create image-start∂n" "{destfile}"
- replace -c ∞ /([0-9a-f]«8»)®1/ ®1" , " "{destfile}"
- replace /≈/ "∂nimage-start dup here swap -∂n" "{destfile}"
-
- save "{destfile}"
- close "{destfile}"
-
- # example--> makecreate myrom.bin myrom.create
-
-